/* eslint-disable @typescript-eslint/no-unused-vars */
/*
 * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
import { AbstractClient } from "../../../common/abstract_client"
import { ClientConfig } from "../../../common/interface"
import {
  DescribeGetAuthInfoResponse,
  SyncIcpOrderWebInfoResponse,
  SyncIcpOrderWebInfoRequest,
  CreateWeappQRUrlRequest,
  CreateWeappQRUrlResponse,
  DescribeGetAuthInfoRequest,
} from "./ba_models"

/**
 * ba client
 * @class
 */
export class Client extends AbstractClient {
  constructor(clientConfig: ClientConfig) {
    super("ba.tencentcloudapi.com", "2020-07-20", clientConfig)
  }

  /**
     * 将备案ICP订单下的一个网站信息 同步给订单下其他网站，需要被同步的网站被检查通过(isCheck:true)；
只有指定的网站信息字段能被同步
     */
  async SyncIcpOrderWebInfo(
    req: SyncIcpOrderWebInfoRequest,
    cb?: (error: string, rep: SyncIcpOrderWebInfoResponse) => void
  ): Promise<SyncIcpOrderWebInfoResponse> {
    return this.request("SyncIcpOrderWebInfo", req, cb)
  }

  /**
   * 创建渠道备案小程序二维码
   */
  async CreateWeappQRUrl(
    req: CreateWeappQRUrlRequest,
    cb?: (error: string, rep: CreateWeappQRUrlResponse) => void
  ): Promise<CreateWeappQRUrlResponse> {
    return this.request("CreateWeappQRUrl", req, cb)
  }

  /**
   * 获取实名认证信息
   */
  async DescribeGetAuthInfo(
    req?: DescribeGetAuthInfoRequest,
    cb?: (error: string, rep: DescribeGetAuthInfoResponse) => void
  ): Promise<DescribeGetAuthInfoResponse> {
    return this.request("DescribeGetAuthInfo", req, cb)
  }
}
